fix(frontend): stop mount config from showing cache limits it never sends (#811) - #818
Merged
Merged
Conversation
…ends (#811) The rclone mount form substituted "50G"/"504h"/"1m" whenever the stored VFS cache limit was empty, so a config with no limit looked like a configured 50G cap while AltMount sent no CacheMaxSize to rclone at all (rclone then caches without bound). Show the stored values verbatim and keep the defaults as placeholders, plus warn inline when caching is on with no size limit. Also note in the section that mount options are only applied when the mount is created, so saving alone does not affect a running mount.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to triage of #811 ("Internal Rclone mount not correctly purging used storage"). Two UI-side defects that make the rclone VFS cache limits look configured when they are not.
1. The form fabricated limits that were never sent to rclone.
buildRCloneMountFormDatausedconfig.rclone.vfs_cache_max_size || "50G"(and the same forvfs_cache_max_age/vfs_cache_poll_interval). If the stored value was empty, the UI displayed50Gwhile the backend'sif != ""guard inpkg/rclonecli/client.gosent noCacheMaxSizeat all — and rclone's default is no cap, so the cache directory grows until the disk fills. That is exactly the reported symptom. Now the stored value is shown verbatim, the defaults remain asplaceholderhints, and an inline warning appears when cache mode is on with an empty max size.2. No indication that a remount is required.
vfsOptis only built inperformMount, and noOnConfigChangehandler remounts, so edits to the cache limits do nothing to a running mount until stop/start or an app restart. The section now says so.Not included
Verified during triage and left for separate changes:
mount/mountpayload against rclone 1.72.1, andvfs/statsreportedCacheMaxSize: 53687091200,CacheMaxAge: 1814400000000000,CachePollInterval: 60000000000. When a mount is created, the limits do reach rclone.vfs_cache_min_free_space,vfs_disk_space_total,dir_cache_time,async_read,use_mmap,vfs_fast_fingerprint,vfs_read_chunk_streams,read_only,umask,transfers,timeout,syslog.vfs_cache_min_free_spaceis the notable one since it reads as a cache limit.Test plan
bun run check(biome) cleanbun run build(tsc -b+ vite) greenvfs_cache_max_size: ""→ field renders empty with the warning, not a phantom50Gvfs_cache_max_size: 50G→ field renders50G, no warningRefs #811